﻿using System;
using System.Linq;
using System.Collections.Generic;

using TempEmployees.DAL;
using TempEmployees.BLL.Database;

namespace TempEmployees.BLL.EntitiesExtensions
{
    public static class EDepartment 
    {
        public static List<Department> GetDepartments()
        {
            return DbQuery.Database.Departments.ToList();
        }

        public static Department GetDepartment(int id)
        {
            return GetDepartments().Where(d => d.ID == id).First();
        }
    }
}
